module Main
where

data Channel c = Channel c


data Colour r g b = Colour r g b

red :: Colour r g b -> r
red (Colour r g b) = r

green :: Colour r g b -> g
green (Colour r g b) = g

blue :: Colour r g b -> b
blue (Colour r g b) = b

data Pixel a b c d = 	  Mono a
						| Duo a b
						| RGB a b c
						| CMYK a b c d

channel1 (Mono	a)			= a
channel1 (Duo	a b)		= a
channel1 (RGB	a b c)		= a
channel1 (CMYK	a b c d)	= a

channel2 (Mono	a)			= Nothing
channel2 (Duo	a b)		= Just b
channel2 (RGB	a b c)		= Just b
channel2 (CMYK	a b c d)	= Just b
